import * as ElementPlusIconsVue from "@element-plus/icons-vue"
import type { App } from "vue"

const dictIcon: Record<string, any> = {
  ...ElementPlusIconsVue,
}

const installIcon = (app: App) => {
  // 便于模板获取
  app.config.globalProperties.$icon = dictIcon
  for (let iconName in dictIcon) {
    app.component(iconName, dictIcon[iconName])
  }
}

export default installIcon
